-module(tr_server_sup).
-behaviour(supervisor).

-export([start_link/0, 
         start_child/1]).

-export([init/1]).

-define(CHILD(Id, Mod, Type, Args), {Id, {Mod, start_link, Args},
                                     temporary, brutal_kill, Type, [Mod]}).
start_link() ->
    supervisor:start_link({local, ?MODULE}, ?MODULE, []).

start_child(LSock)->
    supervisor:start_child(?MODULE, [LSock]).

init([]) ->
    {ok, {{simple_one_for_one, 0, 1}, 
          [?CHILD(tr_server, tr_server, worker, [])]}}.

